package com.mlog.njyjy.ndop.monitor;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import io.github.yedaxia.apidocs.Docs;
import io.github.yedaxia.apidocs.DocsConfig;
import springfox.documentation.swagger2.annotations.EnableSwagger2;


@SpringBootApplication
@EnableSwagger2
@MapperScan("com.mlog.njyjy.ndop.monitor.dao.mapper")
public class MonitorApplication {
	
	public static void main(String[] args) {
		SpringApplication.run(MonitorApplication.class, args);
	}
	
	void apiDoc() {
		DocsConfig config = new DocsConfig();
		config.setProjectPath("com.mlog.njyjy.ndop.monitor"); // 项目根目录
		config.setProjectName("系统室服务器监控"); // 项目名称
		config.setApiVersion("V1.0");       // 声明该API的版本
		config.setDocsPath("/resources/apidoc"); // 生成API 文档所在目录
		config.setAutoGenerate(Boolean.TRUE);  // 配置自动生成
		Docs.buildHtmlDocs(config); // 执行生成文档
	}

}
